﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using BusinessObjects.BO_GetObjects;

/// <summary>
/// Summary description for Admin
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
[System.Web.Script.Services.ScriptService]
public class Admin : System.Web.Services.WebService {

    public Admin() {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod]
    public string HelloWorld() {
        return "Hello World";
    }

    [WebMethod]
    public bool Members_Vip() {
        return true;
    }

    //----Admin module----

    [WebMethod]
    public bool AMOrder(string ids) {
        return BO_cms_admin_modules.Order(ids);
    }

    //----Advertising----
    [WebMethod]
    public bool ADVOrder(string id, int module) {
        return BO_portal_ads_pictures.Order(id, module);
    }
    //----Categories----
    [WebMethod]
    public bool CateOrder(string id) {
        return BO_portal_categories.Order(id);
    }
    //----Modules----
    [WebMethod]
    public bool MDOrder(string id, int category, int location) {
        return BO_portal_modules.Order(id, location, category);
    }
    //----OnlineSupport----
    [WebMethod]
    public bool OSOrder(string id, int module) {
        return BO_cms.Join_Tables_Order(id, "FK_portal_online_support_portal_modules", module);
    }

    //---- Weblink----
    [WebMethod]
    public bool WLOrder(string id, int module) {
        return BO_cms.Join_Tables_Order(id, "FK_portal_weblinks_portal_modules", module);
    }

    //---- Partner----
    [WebMethod]
    public bool PNOrder(string id, int module) {
        return BO_cms.Join_Tables_Order(id, "PORTAL_PARTNERS/PORTAL_MODULES", module);
    }
}
